package com.example.demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;


@EnableAspectJAutoProxy(exposeProxy = true)
//配合@WebFilter使用
//@ServletComponentScan
@Slf4j
//@ComponentScans(value = {@ComponentScan("controller.componentScan.controller"), @ComponentScan("com.example.controller"), @ComponentScan("com.example.springLearning.*")})
@SpringBootApplication(scanBasePackages = {"controller.componentScan.controller", "com.example.controller", "com.example.springLearning", "com.example.demo", "com.example.demo.game.template"})
public class DemoApplication {

    public static void main(String[] args) {
        //ApplicationContext applicationContext;

                //把自定义监听器注册到 initialMulticaster 广播体系中
//        MyApplicationEventPreparedEventListener myApplicationEventPreparedEventListener = new MyApplicationEventPreparedEventListener();
//        SpringApplication springApplication = new SpringApplicationBuilder(DemoApplication.class).listeners(myApplicationEventPreparedEventListener).build();
//        springApplication.run(args);
//
        SpringApplication.run(DemoApplication.class, args);
//        log.info("启动成功");
    }

}
